<?php

class Core_Form_Admin_Setting_Site extends Form
{
	function init()
	{

		$this -> addChild('radio', 'app_env', array(
			'multiOptions' => array(
				'developement' => 'Development',
				'production' => 'Production',
			),
			'label' => 'app_env {label}',
			'value' => 'production',
			'desc' => 'app_env {desc}',
			'required' => true,
			'rules' => array('required')
		));

		$this -> addChild('radio', 'debug', array(
			'multiOptions' => array(
				'1' => 'Yes',
				'0' => 'No',
			),
			'label' => 'bebug {label}',
			'value' => '0',
			'desc' => 'bebug {desc}',
			'required' => true,
			'rules' => array('required')
		));

		$this -> addChild('radio', 'profilling', array(
			'multiOptions' => array(
				'1' => 'Yes',
				'0' => 'No',
			),
			'label' => 'profilling {label}',
			'desc' => 'profilling {desc}',
			'value' => '0',
			'required' => true,
			'rules' => array('required')
		));

		$this -> addChild('radio', 'app_mode', array(
			'multiOptions' => array(
				'offline' => 'Offline',
				'online' => 'Online',
			),
			'label' => 'app_mode {label}',
			'desc' => 'app_mode {desc}',
			'value' => 'Online',
			'required' => true,
			'rules' => array('required')
		));

		$this -> addChild('text', 'access_code', array(
			'label' => 'access_code {label}',
			'desc' => 'access_code {desc}'
		));

		$this -> addChild('text', 'static_url', array(
			'label' => 'static_url {label}',
			'desc' => 'static_url {desc}'
		));

		$this -> addChild('text', 'cookie_prefix', array(
			'label' => 'cookie_prefix {label}',
			'required' => true,
			'value' => 'ag-',
			'rules' => array('required'),
			'desc' => 'cookie_prefix {desc}'
		));

		$this -> addChild('text', 'cookie_path', array(
			'label' => 'cookie_path {label}Cookie Path',
			'required' => true,
			'value' => '/',
			'rules' => array('required'),
			'desc' => 'cookie_path {desc}'
		));

		$this -> addChild('text', 'cookie_domain', array(
			'label' => 'cookie_domain {label}',
			'rules' => array('required'),
			'desc' => 'cookie_domain {desc}'
		));
		$this -> addChild('text', 'session_lifetime', array(
			'label' => 'session_lifetime {label}',
			'required' => true,
			'value' => '86400',
			'rules' => array('required'),
			'desc' => 'session_lifetime {desc}'
		));

		$this -> addChild('group', 'buttons');

		$this -> buttons -> addChild('submit', '_submit') -> addChild('cancel', '_cancel');
	}

}
